package task1;

public class CalculationThread extends Thread {

	private double start, end, step, _sum;

	public CalculationThread(double start, double end,
			double step) {
		this.start = start;
		this.end = end;
		this.step = step;
		this._sum = 0.0;
	}

	public void run() {
		for (double i = start; i <= end; i += step) {
			_sum += Math.sin(i) * Math.cos(i);
		}
		CalculationApplication.addToResult(_sum);
	}
}
